package cn.sqlog.simplewol.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * Created with IntelliJ IDEA.
 * User: SQ
 * Date: 2019/9/4
 * Time: 14:47
 * Description:
 */
@Configuration
public class DefaultPageConfig implements WebMvcConfigurer {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/").setViewName("forward:/dist/index.html");
        registry.setOrder(Ordered.HIGHEST_PRECEDENCE);
    }
}
